﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Chenxin.Lib.Utility;

public partial class AttendanceManage : PageBase
{
    public DateTime curDT;

    protected void Page_Load(object sender, EventArgs e)
    {
        DateTime dtCur = new DateTime();
        //考勤周期业务类
        Chenxin.Lib.Hr.BLL.Struct_AttendanceCircle bllAttendanceCir = new Chenxin.Lib.Hr.BLL.Struct_AttendanceCircle();
        //考勤周期实体类
        Chenxin.Lib.Hr.Entity.Struct_AttendanceCircle entAttendanceCir = bllAttendanceCir.GetModel();

        if (entAttendanceCir.StartMonthFlg == entAttendanceCir.EndMonthFlg)
        {
            curDT = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
        }
        else
        {
            //判断当前月份
            if (DateTime.Now.Day < entAttendanceCir.StartDate.Value)
            {
                curDT = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
            }
            else
            {
                if (DateTime.Now.Month == 12)
                {
                    curDT = new DateTime(DateTime.Now.Year + 1, 1, DateTime.Now.Day);
                }
                else
                {
                    curDT = new DateTime(DateTime.Now.Year, DateTime.Now.Month + 1, DateTime.Now.Day);
                }
            }
        }
            
    }

   
}
